home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
MISC
/
TIMEDATE.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-08-15
|
1KB
|
33 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; time and date handling
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBBAS;
var Time1, Time2 : TimeObjectType;
begin
Time1.Initialize;
WriteLn ('* Date handling *');
WriteLn ('Today is ', Profile.Environment.DayNames[Time1.DayOfWeek]);
if Time1.IsLeapYear then WriteLn ('It''s a leap year.');
Time2.InitializeDuplicate (@Time1);
if Time1.IsEqual(@Time2) then WriteLn ('Duplicated time into a new object.');
WriteLn ('It''s the ', Time1.DayOfYear, ' day of this year.');
WriteLn ('Now is ', Time2.StringDate,
' at ', Time1.StringTime, ' o''clock.');
WriteLn (Time2.StringMidnightTime, ' has passed since midnight.');
Time1.Intercept; Time2.Intercept;
end.